import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        System.out.println(sum(n));
    }

    public static int sum(int n){
        if(n ==1 || n == 2) return 1;
        int fir = 1;
        int sec = 1;
        int sum = 0;
        for(int i = 3; i <= n; i++){
            sum = fir + sec;
            fir = sec;
            sec = sum;
        }
        return sum;
    }
}


